package com.qyer.search.report;

import com.qyer.search.model.SearchParameterEntity;
import com.qyer.search.model.SearchParameterOrigin;
import com.qyer.search.model.result.SearchEntity;
import com.qyer.search.model.result.SearchPackage;

import java.util.List;

/**
 * Created by tangzheng on 16/7/19.
 */
public class VSearchReportItem {

  private SearchParameterEntity searchParameterOrigin;

  private List<? extends SearchEntity> resultPackages;

  private VSearchReportItem() {
  }

  public VSearchReportItem(SearchParameterEntity searchParameter,
                          List<? extends SearchEntity> resultPackages) {
    this.searchParameterOrigin = searchParameter;
    this.resultPackages = resultPackages;
  }

  public static VSearchReportItem createPill() {
    return new VSearchReportItem();
  }

  public boolean isPill() {
    return this.searchParameterOrigin == null && this.resultPackages == null;
  }

  public SearchParameterOrigin getSearchParameter() {
    return searchParameterOrigin;
  }

  public List<? extends SearchEntity> getResultPackages() {
    return resultPackages;
  }
}
